//导入枚举
import employees from '@/api/constant/employees'
import store from '@/store'
import moment from 'moment'

export const myEmployees = function (value) {
  const obj = employees.hireType.find(item => {
    return (item.id = value)
  })

  return obj ? obj.value : '未知'
}

export const timeformata = function (value) {
  return moment(value).format('YYYY:MM:DD')
}

//过滤按钮权限
export const hasRigo = function (value) {
  return !store.getters.userInfo.roles.points.includes(value)
}
